package o;

import com.google.android.exoplayer2.text.Cue;
import java.util.Collections;
import java.util.List;

final class akc implements aji {
    private final long[] ˎ;
    private final Cue[] ॱ;

    public akc(Cue[] cueArr, long[] jArr) {
        this.ॱ = cueArr;
        this.ˎ = jArr;
    }

    public int ॱ(long j) {
        int ॱ = anr.ॱ(this.ˎ, j, false, false);
        return ॱ < this.ˎ.length ? ॱ : -1;
    }

    public int ॱ() {
        return this.ˎ.length;
    }

    public long ˊ(int i) {
        boolean z;
        boolean z2 = true;
        if (i >= 0) {
            z = true;
        } else {
            z = false;
        }
        amm.ˊ(z);
        if (i >= this.ˎ.length) {
            z2 = false;
        }
        amm.ˊ(z2);
        return this.ˎ[i];
    }

    public List<Cue> ˊ(long j) {
        int ˊ = anr.ˊ(this.ˎ, j, true, false);
        if (ˊ == -1 || this.ॱ[ˊ] == null) {
            return Collections.emptyList();
        }
        return Collections.singletonList(this.ॱ[ˊ]);
    }
}
